import { defHttp } from '@/utils/http/axios';
import {
  LogsPageParams,
  LoginLogsPageParams,
  LogsListGetResultModel,
  LoginLogsListGetResultModel,
} from './model/systemModel';

enum Api {
  // 系统日志
  LogList = '/log/syslog',
  // 登录日志
  LoginLogList = '/log/login',
}

/**
 * 系统日志
 * @param params
 * @returns
 */
export const getLogsList = (params: LogsPageParams) =>
  defHttp.get<LogsListGetResultModel>({ url: Api.LogList, params });

/**
 * 系统登录日志
 * @param params
 * @returns
 */
export const getLoginLogsList = (params: LoginLogsPageParams) =>
  defHttp.get<LoginLogsListGetResultModel>({ url: Api.LoginLogList, params });
